from page.page_in import PageIn
from tools.get_driver import GetDriver
from tools.get_log import GetLog
logger = GetLog.get_logger()


class TestZoCheckWorkBench:
    # 1.初始化
    def setup_class(self):
        driver = GetDriver.get_app_driver()
        self.zoCheckWorkBench = PageIn(driver).page_get_ZoPageCheckWorkBench()

    # 2.结束
    def teardown_class(self):
        GetDriver.quit_app_driver()

    # 3.中欧工作台跳转业务方法
    def test_zo_check_workbench(self):
        self.zoCheckWorkBench.zo_page_check_workbench()
        # 调试断言
        try:
            # 断言
            assert self.zoCheckWorkBench.zo_page_is_workbench()
        except Exception as e:
            # 1.日志
            logger.info(e)
            # 2.截图
            self.zoCheckWorkBench.base_get_image()
            # 3.抛异常
            raise

